
// FriendEntity.java
package com.example.app.Entity;

import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.PrimaryKey;
@Entity(tableName = "friends",
        foreignKeys = @ForeignKey(entity = UserEntity.class,
                parentColumns = "userId",
                childColumns = "friendUserId",
                onDelete = ForeignKey.CASCADE))
public class FriendEntity {
    @PrimaryKey(autoGenerate = true)
    private int id;
    private String userId;
    private String friendUserId; // 好友的用户ID
    private String remark;
    private String category;
    private FriendStatus status;

    // Getters and Setters
    public int getId() { return id; }
    public void setId(int id) { this.id = id; }
    public String getUserId() { return userId; }
    public void setUserId(String userId) { this.userId = userId; }
    public String getFriendUserId() { return friendUserId; }
    public void setFriendUserId(String friendUserId) { this.friendUserId = friendUserId; }
    public String getRemark() { return remark; }
    public void setRemark(String remark) { this.remark = remark; }
    public String getCategory() { return category; }
    public void setCategory(String category) { this.category = category; }
    public FriendStatus getStatus() { return status; }
    public void setStatus(FriendStatus status) { this.status = status; }
}